import { request } from 'umi';
import { IQuestionForm ,IAddTyoes,ICondition} from '@/utils/interface';

// 获取试题列表
export function getQuestionType(){
  return request('/exam/getQuestionsType');
}

// 获取所有课程
export function getExamSubject(){
  return request('/exam/subject');
}

// 获取所有考试类型
export function getExamType(){
  return request('/exam/examType');
}
export function submitQuestions(data:  IQuestionForm){
  return request('/exam/questions',{
    method:'POST',
    data
  })
}
//获取添加试题类型
export function insertQuestionsType(value:IAddTyoes){
  return request('/exam/insertQuestionsType',{
    params:value
  })
}
//获取查看试题里的所有试题
export function newType(){
  return request('/exam/questions/new')
}
//按条件获取试题
export function conditionQuestions(data:ICondition){
  return request('/exam/questions/condition',{params:data})
}
//展示用户
export function User(){
  return request('/user/user')
}
//展示身份
export function IDentity(){
  return request('/user/identity')
}
//展示api接口权限数据
export function APi(){
  return request('/user/api_authority')
}
//展示身份和api权限关系
export function IAA(){
  return request('/user/identity_api_authority_relation')
}
//获取视图权限数据
export function VIEW(){
  return request('/user/view_authority')
}
//展示身份和视图权限关系
export function IVAR(){
  return request('/user/identity_view_authority_relation')
}